package com.ojoin.trade.supplyloan_core.web.domain;

import java.util.Date;

import com.ojoin.trade.common.utils.CommonUtils;
import com.ojoin.trade.common.utils.TimeUtils;
import com.ojoin.trade.common.web.domain.IDentifiable;

/**
 * Created with IntelliJ IDEA. User: Administrator Date: 15-10-29 Time: 下午2:55
 * To change this template use File | Settings | File Templates.
 */
public class TbSlLoanStatTotalVoCompare implements IDentifiable{

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	private Integer id;
	
	private Integer idOfTbMerchantUser;

    private Integer idOfPlatformUser;
    
    private String mhtname;
     
    private String platformUname;
    
   
    
    private long totalUnsettleInstoreorder;

    private long totalUnenterinRefundorder;

    private long totalUnpaySettleorder;
    
    private long totalUnpaySettleorderCheck;
    private long totalPaySettleorder;
    
    private long beforetotalUnsettleInstoreorder;
 
    private long beforetotalUnenterinRefundorder;

    private long beforetotalUnpaySettleorder;
    
    private long beforetotalUnpaySettleorderCheck;
    
    private long beforetotalPaySettleorder;

    private long newUnsettleInstoreorder;

    private long newUnenterinRefundorder;

    private long newUnpaySettleorder;
     
    private long newPaySettleorder;
    
    private String settlementState;
    
    private String statEndDate;

    private String platformName;
    
    private String platformCnname;
    private String platformMemo;
    private Date rowUpdateTime;
    
    private String updateTime;
    
    private long beforetotalAll;
    // 抓取数据的合计值
    private long totalAll ;
    
   
    
// 按不同的平台进行数据的显示 
	public long getTotalAll() {
		
		if(TbSlPlatformInfo.SUPPLIER_SUNING.equals(this.getPlatformName())){
			totalAll = this.getTotalUnsettleInstoreorder()+this.getTotalUnenterinRefundorder()-this.getTotalPaySettleorder() ;
		}else if(TbSlPlatformInfo.THIRDSELLER_SUNING.equals(this.getPlatformName())){
			totalAll = this.getTotalUnsettleInstoreorder()+this.getTotalUnenterinRefundorder()-this.getTotalPaySettleorder()+this.getTotalUnpaySettleorderCheck()+this.getTotalUnpaySettleorder() ;
		}else {
			totalAll = this.getTotalUnsettleInstoreorder()+this.getTotalUnenterinRefundorder()-this.getTotalPaySettleorder()+this.getTotalUnpaySettleorderCheck()+this.getTotalUnpaySettleorder() ;
		}

		return totalAll;
	}

	public long getNewPaySettleorder() {
		return newPaySettleorder;
	}


	public void setNewPaySettleorder(long newPaySettleorder) {
		this.newPaySettleorder = newPaySettleorder;
	}

	public long getBeforetotalAll() {
		if(TbSlPlatformInfo.SUPPLIER_SUNING.equals(this.getPlatformName())){
			beforetotalAll = this.getBeforetotalUnsettleInstoreorder()+this.getBeforetotalUnenterinRefundorder()-this.getBeforetotalPaySettleorder() ;
		}else if(TbSlPlatformInfo.THIRDSELLER_SUNING.equals(this.getPlatformName())){
			beforetotalAll = this.getBeforetotalUnsettleInstoreorder()+this.getBeforetotalUnenterinRefundorder()-this.getBeforetotalPaySettleorder()+this.getBeforetotalUnpaySettleorderCheck()+this.getBeforetotalUnpaySettleorder() ;
		}else { 
			beforetotalAll = this.getBeforetotalUnsettleInstoreorder()+this.getBeforetotalUnenterinRefundorder()-this.getBeforetotalPaySettleorder()+this.getBeforetotalUnpaySettleorderCheck()+this.getBeforetotalUnpaySettleorder() ;
		}
		 
		return beforetotalAll;
	}


	public long getNewUnsettleInstoreorder() {
		return newUnsettleInstoreorder;
	}

	public void setNewUnsettleInstoreorder(long newUnsettleInstoreorder) {
		this.newUnsettleInstoreorder = newUnsettleInstoreorder;
	}

	public long getNewUnenterinRefundorder() {
		return newUnenterinRefundorder;
	}

	public void setNewUnenterinRefundorder(long newUnenterinRefundorder) {
		this.newUnenterinRefundorder = newUnenterinRefundorder;
	}

	public long getNewUnpaySettleorder() {
		return newUnpaySettleorder;
	}

	public void setNewUnpaySettleorder(long newUnpaySettleorder) {
		this.newUnpaySettleorder = newUnpaySettleorder;
	}

	public String getUpdateTime() {
		if(!CommonUtils.isEmpty(rowUpdateTime)){
			updateTime = TimeUtils.getDateString(rowUpdateTime);
		}
		
		return updateTime;
	}

	public String getSettlementState() {
		return settlementState;
	}

	public void setSettlementState(String settlementState) {
		this.settlementState = settlementState;
	}

	public long getTotalUnsettleInstoreorder() {
		return totalUnsettleInstoreorder;
	}

	public void setTotalUnsettleInstoreorder(long totalUnsettleInstoreorder) {
		this.totalUnsettleInstoreorder = totalUnsettleInstoreorder;
	}

	public long getTotalUnenterinRefundorder() {
		return totalUnenterinRefundorder;
	}

	public void setTotalUnenterinRefundorder(long totalUnenterinRefundorder) {
		this.totalUnenterinRefundorder = totalUnenterinRefundorder;
	}

	public long getTotalUnpaySettleorder() {
		return totalUnpaySettleorder;
	}

	public void setTotalUnpaySettleorder(long totalUnpaySettleorder) {
		this.totalUnpaySettleorder = totalUnpaySettleorder;
	}

	public long getTotalPaySettleorder() {
		return totalPaySettleorder;
	}

	public void setTotalPaySettleorder(long totalPaySettleorder) {
		this.totalPaySettleorder = totalPaySettleorder;
	}

	public long getBeforetotalUnsettleInstoreorder() {
		return beforetotalUnsettleInstoreorder;
	}

	public void setBeforetotalUnsettleInstoreorder(
			long beforetotalUnsettleInstoreorder) {
		this.beforetotalUnsettleInstoreorder = beforetotalUnsettleInstoreorder;
	}

	 

	public long getBeforetotalUnenterinRefundorder() {
		return beforetotalUnenterinRefundorder;
	} 

	public void setBeforetotalUnenterinRefundorder(
			long beforetotalUnenterinRefundorder) {
		this.beforetotalUnenterinRefundorder = beforetotalUnenterinRefundorder;
	}

	public long getBeforetotalUnpaySettleorder() {
		return beforetotalUnpaySettleorder;
	}

	public void setBeforetotalUnpaySettleorder(long beforetotalUnpaySettleorder) {
		this.beforetotalUnpaySettleorder = beforetotalUnpaySettleorder;
	}

	public long getBeforetotalPaySettleorder() {
		return beforetotalPaySettleorder;
	}

	public void setBeforetotalPaySettleorder(long beforetotalPaySettleorder) {
		this.beforetotalPaySettleorder = beforetotalPaySettleorder;
	}


	
	public Integer getIdOfPlatformUser() {
		return idOfPlatformUser;
	}

	public void setIdOfPlatformUser(Integer idOfPlatformUser) {
		this.idOfPlatformUser = idOfPlatformUser;
	}

	public String getPlatformName() {
		return platformName;
	}

	public void setPlatformName(String platformName) {
		this.platformName = platformName;
	}

	public String getMhtname() {
		return mhtname;
	}

	public void setMhtname(String mhtname) {
		this.mhtname = mhtname;
	}

	public Integer getIdOfTbMerchantUser() {
        return idOfTbMerchantUser;
    }

    public void setIdOfTbMerchantUser(Integer idOfTbMerchantUser) {
        this.idOfTbMerchantUser = idOfTbMerchantUser;
    }


  

    public String getStatEndDate() {
        return statEndDate;
    }

    public void setStatEndDate(String statEndDate) {
        this.statEndDate = statEndDate == null ? null : statEndDate.trim();
    }

	public String getPlatformUname() {
		return platformUname;
	}

	public void setPlatformUname(String platformUname) {
		this.platformUname = platformUname;
	}

	public String getPlatformCnname() {
		return platformCnname;
	}

	public void setPlatformCnname(String platformCnname) {
		this.platformCnname = platformCnname;
	}

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	@Override
	public Date getRowUpdateTime() {
		return rowUpdateTime;
	}
 
	@Override
	public void setRowUpdateTime(Date rowUpdateTime) {
		this.rowUpdateTime = rowUpdateTime;
		
	}

	@Override
	public String getTableName() {
		
		return null;
	}

	@Override
	public Date getRowCreateTime() {
		
		return null;
	}
 
	@Override
	public void setRowCreateTime(Date rowCreateTime) {
		
		
	}

	public long getTotalUnpaySettleorderCheck() {
		return totalUnpaySettleorderCheck;
	}

	public void setTotalUnpaySettleorderCheck(long totalUnpaySettleorderCheck) {
		this.totalUnpaySettleorderCheck = totalUnpaySettleorderCheck;
	}

	public long getBeforetotalUnpaySettleorderCheck() {
		return beforetotalUnpaySettleorderCheck;
	}

	public void setBeforetotalUnpaySettleorderCheck(
			long beforetotalUnpaySettleorderCheck) {
		this.beforetotalUnpaySettleorderCheck = beforetotalUnpaySettleorderCheck;
	}

	public String getPlatformMemo() {
		return platformMemo;
	}

	public void setPlatformMemo(String platformMemo) {
		this.platformMemo = platformMemo;
	}

}
